package netty.demo.nio.selector.dealMessage;

import lombok.SneakyThrows;

import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.channels.SocketChannel;
import java.nio.charset.Charset;

/**
 * @author Zed
 * @description
 * @date 2022/10/23 10:31
 */
public class Client {
    @SneakyThrows
    public static void main(String[] args) {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost", 8080));
        sc.write(Charset.defaultCharset().encode("0123456789abcd4144514\n"));
        System.in.read();
    }
}
